﻿using System;
using System.Collections.Generic;

namespace Chengheng.Entity.Models;

/// <summary>
/// 销售_零售单
/// </summary>
public partial class SaleRetailorder
{
    public long Id { get; set; }

    /// <summary>
    /// 销售日期
    /// </summary>
    public DateOnly? Date { get; set; }

    /// <summary>
    /// 折扣-存入的数字是百分比
    /// </summary>
    public decimal? Discount { get; set; }

    /// <summary>
    /// 应收金额
    /// </summary>
    public decimal? ReceivableAmount { get; set; }

    /// <summary>
    /// 实收金额
    /// </summary>
    public decimal? ReceivedAmount { get; set; }

    /// <summary>
    /// 门店
    /// </summary>
    public string? Store { get; set; }

    /// <summary>
    /// 状态: 0 挂单 1 未完成 1 已完成
    /// 
    /// </summary>
    public sbyte? Status { get; set; }

    public long TenantId { get; set; }

    /// <summary>
    /// 零售票号
    /// </summary>
    public string? TicketNumber { get; set; }

    /// <summary>
    /// 总数量
    /// </summary>
    public int? TotalNumber { get; set; }

    /// <summary>
    /// 出货仓库
    /// </summary>
    public string? Warehouse { get; set; }

    /// <summary>
    /// 顾客_信息_id
    /// </summary>
    public long? CustomerCustomerId { get; set; }

    /// <summary>
    /// 雇员_店员_id
    /// </summary>
    public long? EmployeeEmployeeId { get; set; }

    public virtual CustomerCustomer? CustomerCustomer { get; set; }

    public virtual EmployeeEmployee? EmployeeEmployee { get; set; }

    public virtual ICollection<SaleRetailorderPaymentmethod> SaleRetailorderPaymentmethods { get; set; } = new List<SaleRetailorderPaymentmethod>();

    public virtual ICollection<SaleRetailorderitem> SaleRetailorderitems { get; set; } = new List<SaleRetailorderitem>();
}
